import request from '@/utils/request'

// 查询索赔记录列表
export function listRecord(query) {
  return request({
    url: '/insurance/record/list',
    method: 'get',
    params: query
  })
}

// 查询索赔记录详细
export function getRecord(claimId) {
  return request({
    url: '/insurance/record/' + claimId,
    method: 'get'
  })
}

// 新增索赔记录
export function addRecord(data) {
  return request({
    url: '/insurance/record',
    method: 'post',
    data: data
  })
}

// 修改索赔记录
export function updateRecord(data) {
  return request({
    url: '/insurance/record',
    method: 'put',
    data: data
  })
}

// 删除索赔记录
export function delRecord(claimId) {
  return request({
    url: '/insurance/record/' + claimId,
    method: 'delete'
  })
}
